﻿@using SchoolPointe.Menus.Helpers
@using SchoolPointe.Menus.ViewModels

@model SchoolPointe.Menus.ViewModels.MenuItemContentItemViewModel          

@if (Model.Id > 0)
{    
    @Html.ValidationMessageFor(m => m.Text)

    @Html.HiddenFor(m => m.Id)
    @Html.HiddenFor(m => m.SortOrder)
    @Html.HiddenFor(m => m.MenuItemType)

    @Html.LabelFor(m => m.Text)
    @Html.TextBoxFor(m => m.Text, new { placeholder = "Menu Item" }) 
    
    if (Model.ContentItem != null)
    {
        <div style="padding: 5px; border: 1px solid #DFDFDF; color:#777; font-size:12px; margin-top:10px;" class="ui-corner-all">
            <span style="font-style:italic;">Original: </span><a href="@Url.ItemDisplayUrl(Model.ContentItem)" style="text-decoration: underline;" target="_BLANK">@Html.ItemDisplayText(Model.ContentItem)</a>
        </div>
    }
}